using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace QuanLyThuVien_Nhom23
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            if (Program.user == false)
            {
                frmDangNhap frm = new frmDangNhap();
                frm.Show();
            }
            else
            {
                frmMuonSach muonsach = new frmMuonSach();
                muonsach.ShowDialog();
            }
        }

        private void btExit_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btDangNhap_Click(object sender, EventArgs e)
        {
            frmDangNhap frm = new frmDangNhap();
            frm.Show();
        }

        private void btDangKy_Click(object sender, EventArgs e)
        {
            frmCapTheDocGia frm = new frmCapTheDocGia();
            frm.Show();
        }

        private void btnBaoCao_Click(object sender, EventArgs e)
        {
            if (Program.user == false)
            {
                frmDangNhap frm = new frmDangNhap();
                frm.Show();
            }
            else
            {
                frmLapBaoCao frm = new frmLapBaoCao();
                frm.Show();
            }
        }

        private void btnSearch_Click(object sender, EventArgs e)
        {
            frmBookSearch frm = new frmBookSearch();
            frm.Show();
        }

        private void btnTraSach_Click(object sender, EventArgs e)
        {
            if (Program.user == false)
            {
                MessageBox.Show("Ban chua dang nhap");
                frmDangNhap frm = new frmDangNhap();
                frm.Show();
            }
            else
            {
                frmTraSach frm = new frmTraSach();
                frm.Show();
            }
        }

   }
}